Optimal. Leaf size=298 \[ \frac {4 a^2 \left (c^2-7 c d-10 d^2\right ) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{35 d f}+\frac {4 a^2 (c-7 d) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{35 d f}-\frac {2 a^2 \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{7 d f}-\frac {4 a^2 (c+3 d) \left (c^2-10 c d-7 d^2\right ) E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{35 d^2 f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {4 a^2 \left (c^2-7 c d-10 d^2\right ) \left (c^2-d^2\right ) F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{35 d^2 f \sqrt {c+d \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.32, antiderivative size = 298, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {2842, 2832,
2831, 2742, 2740, 2734, 2732} \begin {gather*} \frac {4 a^2 \left (c^2-7 c d-10 d^2\right ) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{35 d f}+\frac {4 a^2 \left (c^2-7 c d-10 d^2\right ) \left (c^2-d^2\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}} F\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{35 d^2 f \sqrt {c+d \sin (e+f x)}}-\frac {4 a^2 (c+3 d) \left (c^2-10 c d-7 d^2\right ) \sqrt {c+d \sin (e+f x)} E\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{35 d^2 f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}-\frac {2 a^2 \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{7 d f}+\frac {4 a^2 (c-7 d) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{35 d f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2831
Rule 2832
Rule 2842
Rubi steps
\begin {align*} \int (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^{3/2} \, dx &=-\frac {2 a^2 \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{7 d f}+\frac {2 \int \left (6 a^2 d-a^2 (c-7 d) \sin (e+f x)\right ) (c+d \sin (e+f x))^{3/2} \, dx}{7 d}\\ &=\frac {4 a^2 (c-7 d) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{35 d f}-\frac {2 a^2 \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{7 d f}+\frac {4 \int \sqrt {c+d \sin (e+f x)} \left (\frac {3}{2} a^2 d (9 c+7 d)-\frac {3}{2} a^2 \left (c^2-7 c d-10 d^2\right ) \sin (e+f x)\right ) \, dx}{35 d}\\ &=\frac {4 a^2 \left (c^2-7 c d-10 d^2\right ) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{35 d f}+\frac {4 a^2 (c-7 d) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{35 d f}-\frac {2 a^2 \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{7 d f}+\frac {8 \int \frac {\frac {3}{2} a^2 d \left (13 c^2+14 c d+5 d^2\right )-\frac {3}{4} a^2 (c+3 d) \left (c^2-10 c d-7 d^2\right ) \sin (e+f x)}{\sqrt {c+d \sin (e+f x)}} \, dx}{105 d}\\ &=\frac {4 a^2 \left (c^2-7 c d-10 d^2\right ) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{35 d f}+\frac {4 a^2 (c-7 d) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{35 d f}-\frac {2 a^2 \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{7 d f}-\frac {\left (2 a^2 (c+3 d) \left (c^2-10 c d-7 d^2\right )\right ) \int \sqrt {c+d \sin (e+f x)} \, dx}{35 d^2}+\frac {\left (2 a^2 \left (c^2-7 c d-10 d^2\right ) \left (c^2-d^2\right )\right ) \int \frac {1}{\sqrt {c+d \sin (e+f x)}} \, dx}{35 d^2}\\ &=\frac {4 a^2 \left (c^2-7 c d-10 d^2\right ) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{35 d f}+\frac {4 a^2 (c-7 d) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{35 d f}-\frac {2 a^2 \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{7 d f}-\frac {\left (2 a^2 (c+3 d) \left (c^2-10 c d-7 d^2\right ) \sqrt {c+d \sin (e+f x)}\right ) \int \sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}} \, dx}{35 d^2 \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {\left (2 a^2 \left (c^2-7 c d-10 d^2\right ) \left (c^2-d^2\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right ) \int \frac {1}{\sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}}} \, dx}{35 d^2 \sqrt {c+d \sin (e+f x)}}\\ &=\frac {4 a^2 \left (c^2-7 c d-10 d^2\right ) \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{35 d f}+\frac {4 a^2 (c-7 d) \cos (e+f x) (c+d \sin (e+f x))^{3/2}}{35 d f}-\frac {2 a^2 \cos (e+f x) (c+d \sin (e+f x))^{5/2}}{7 d f}-\frac {4 a^2 (c+3 d) \left (c^2-10 c d-7 d^2\right ) E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{35 d^2 f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}+\frac {4 a^2 \left (c^2-7 c d-10 d^2\right ) \left (c^2-d^2\right ) F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{35 d^2 f \sqrt {c+d \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.40, size = 262, normalized size = 0.88 \begin {gather*} \frac {a^2 \left (8 \left (c^4-6 c^3 d-44 c^2 d^2-58 c d^3-21 d^4\right ) E\left (\frac {1}{4} (-2 e+\pi -2 f x)|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}-8 \left (c^4-7 c^3 d-11 c^2 d^2+7 c d^3+10 d^4\right ) F\left (\frac {1}{4} (-2 e+\pi -2 f x)|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}+d \cos (e+f x) \left (-4 c^3-112 c^2 d-106 c d^2-28 d^3+2 d^2 (13 c+14 d) \cos (2 (e+f x))-d \left (36 c^2+168 c d+95 d^2\right ) \sin (e+f x)+5 d^3 \sin (3 (e+f x))\right )\right )}{70 d^2 f \sqrt {c+d \sin (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1315\) vs.
\(2(340)=680\).
time = 4.87, size = 1316, normalized size = 4.42
method | result | size |
default | \(\text {Expression too large to display}\) | \(1316\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.20, size = 639, normalized size = 2.14 \begin {gather*} \frac {2 \, {\left (2 \, \sqrt {2} {\left (a^{2} c^{4} - 7 \, a^{2} c^{3} d + 2 \, a^{2} c^{2} d^{2} + 21 \, a^{2} c d^{3} + 15 \, a^{2} d^{4}\right )} \sqrt {i \, d} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) - 3 i \, d \sin \left (f x + e\right ) - 2 i \, c}{3 \, d}\right ) + 2 \, \sqrt {2} {\left (a^{2} c^{4} - 7 \, a^{2} c^{3} d + 2 \, a^{2} c^{2} d^{2} + 21 \, a^{2} c d^{3} + 15 \, a^{2} d^{4}\right )} \sqrt {-i \, d} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) + 3 i \, d \sin \left (f x + e\right ) + 2 i \, c}{3 \, d}\right ) - 3 \, \sqrt {2} {\left (-i \, a^{2} c^{3} d + 7 i \, a^{2} c^{2} d^{2} + 37 i \, a^{2} c d^{3} + 21 i \, a^{2} d^{4}\right )} \sqrt {i \, d} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) - 3 i \, d \sin \left (f x + e\right ) - 2 i \, c}{3 \, d}\right )\right ) - 3 \, \sqrt {2} {\left (i \, a^{2} c^{3} d - 7 i \, a^{2} c^{2} d^{2} - 37 i \, a^{2} c d^{3} - 21 i \, a^{2} d^{4}\right )} \sqrt {-i \, d} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) + 3 i \, d \sin \left (f x + e\right ) + 2 i \, c}{3 \, d}\right )\right ) + 3 \, {\left (5 \, a^{2} d^{4} \cos \left (f x + e\right )^{3} - 2 \, {\left (4 \, a^{2} c d^{3} + 7 \, a^{2} d^{4}\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - {\left (a^{2} c^{2} d^{2} + 28 \, a^{2} c d^{3} + 25 \, a^{2} d^{4}\right )} \cos \left (f x + e\right )\right )} \sqrt {d \sin \left (f x + e\right ) + c}\right )}}{105 \, d^{3} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a^{2} \left (\int c \sqrt {c + d \sin {\left (e + f x \right )}}\, dx + \int 2 c \sqrt {c + d \sin {\left (e + f x \right )}} \sin {\left (e + f x \right )}\, dx + \int c \sqrt {c + d \sin {\left (e + f x \right )}} \sin ^{2}{\left (e + f x \right )}\, dx + \int d \sqrt {c + d \sin {\left (e + f x \right )}} \sin {\left (e + f x \right )}\, dx + \int 2 d \sqrt {c + d \sin {\left (e + f x \right )}} \sin ^{2}{\left (e + f x \right )}\, dx + \int d \sqrt {c + d \sin {\left (e + f x \right )}} \sin ^{3}{\left (e + f x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\left (a+a\,\sin \left (e+f\,x\right )\right )}^2\,{\left (c+d\,\sin \left (e+f\,x\right )\right )}^{3/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________